package com.briup.day26_map;

import java.util.HashMap;
import java.util.Map;

public class MapDemo {
	
	public static void main(String[] args) {
		
		Map map = new HashMap();
		
		map.put("id", 1001);
		map.put("name", "tom");
		map.put("age", 22);
		
		//key不可重复
		map.put("id", 1002);   //替换
		
		System.out.println(map.size());
		
		//value
		System.out.println(map.get("id"));
		
		//不存在返回空
		System.out.println(map.get("email"));
	}

}
